<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'login-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
        'htmlOptions'=>array('class'=>'form-inline definewidth m20'),
)); ?>
    选择章名称：
    <?php echo CHtml::dropDownList('chapter', $key, $chapterlist,array(
        'ajax' => array(
            'type'=>'POST', 
            'url'=>$this->createUrl('/entry/verseList'),
            //Style: CController::createUrl('currentController/methodToCall')
            'update'=>'#verse', //selector to update
            'data'=>array('cid'=>"js:this.value"), 
            //leave out the data key to pass all form values through
        )
    ),array('empty'=>'请选择,您要查看的节名称'))?>&nbsp;&nbsp; 
    <?php echo CHtml::dropDownList('verse', '', array(),array(
        'ajax' => array(
            'type'=>'POST', 
            'url'=>$this->createUrl('/entry/entryList'),
            //Style: CController::createUrl('currentController/methodToCall')
            'update'=>'#entry', //selector to update
            'data'=>array('eid'=>"js:this.value"), 
            //leave out the data key to pass all form values through
        )
    ))?>&nbsp;&nbsp; 
    <?php echo CHtml::dropDownList('entry', '', array())?>
    <button type="submit" class="btn btn-primary">查询</button>&nbsp;&nbsp; <a class="btn btn-success" id="addnew" href="<?php echo $this->createUrl('create');?>">新增菜单</a>
<?php $this->endWidget(); ?>
<h3></h3>
<table class="table table-bordered table-hover definewidth m10">
    <thead>
    <tr>
        <th>序号</th>
       
        <th>节名称</th>
        <th>添加人</th>
        <th>状态</th>
        <th>管理操作</th>
    </tr>
    </thead>
    <?php foreach ($data as $m):?>
        <tr>
            <td><?php echo PdUtils::getSequence($m['chapter_id'], 'chapter').".".  PdUtils::getSequence($m['verse_id'], 'verse').".".$m['sequence']?></td>
            <td><?php echo $m['name']?></td>
            <td>jhy</td>
            <td><?php echo ($m['state'] == 1)?'使用':'禁用'?></td>
            <td><a href="<?php echo $this->createUrl('update',array('id'=>$m['id']));?>">编辑</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="edit.html">删除</a></td>
        </tr>
    <?php endforeach;?>
</table>